package com.codes.service;

import com.utils.ApiSql;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author tim
 * @version 1.0
 * @date 2021/11/16 10:17
 */
@Service
public class ApiService {
    @Autowired
    ApiSql apiSql;

    public Map<String,Object> getData(){
        Map<String,Object> map =new HashMap<>();
        map.put("id","1");
        map.put("name","张三");
        return map;
    }

    public void dbTest(){
        //获取分页数据,group是数据库sys_t_sql 配置的groups code 为配置对应的code
        apiSql.runSqlByParamPage(getData(),"test","page");
    }

}
